﻿/* File Created: ožujka 21, 2012 */

$(document).ready(function () {
    $("#accordion1").click(function () {
        $("#accordion1_sadrzaj").toggle('slow');
    });
    $("#accordion2").click(function () {
        $("#accordion2_sadrzaj").toggle('slow');
    });
    $("#accordion3").click(function () {
        $("#accordion3_sadrzaj").toggle('slow');
    });

    $.fn.modalni_dialog=function(sirina,visina,poruka) {

        $("#poruka").css({ "margin-top": "50px" });
        
        $("#dialog_poruke").dialog({ modal: true,
            dialogClass: 'klasa',
            hide: { effect: "fadeOut", duration: 500 },
            show: { effect: "fadeIn", duration: 500 },
            closeText: 'Zatvori',
            position: 'center',
            minWidth: sirina,
            minHeight: visina,
            open: function () {
                $('div.klasa span.ui-icon').css({ 'display': 'block', 'color': 'white', 'text-decoration': 'none' });
                $(".ui-dialog-titlebar").css({ "background-image": "url(slike/master/blueUlinesUgradient.png)", "background-color": "#000044", "padding": "10px", "bacground-repeat": "repeat-x" });
                $('.klasa').css({ "-moz-box-shadow": "0 0 5px 5px rgba(0,0,0,0.6)", "-webkit-box-shadow": "0 0 5px 5px rgba(0,0,0,0.6)", "box-shadow": "0 0 5px 5px rgba(0,0,0,0.6)", "color": "white", "background-color": "#303030", "border": "thin outset #0000ff" });
                $(".ui-widget-overlay").css({ "position": "absolute", "top": "0px", "left": "0px" });
                $('div.klasa span.ui-icon').css({ 'float': 'left', 'color': 'white', 'text-decoration': 'none', 'font-weight': 'bold' });
            }

        });
        $("#poruka").text(poruka);
    }
});

